package extend;

public class ShapeFactory {
    public Shape getShape(String  i) {//接收Shape的判断值
        if (i.equals("cirle")) {
            return new Circle();
        } else if (i.equals("Square")) {
            return new Square();

        } else  {
            return new Rectangle();
        }
    }
}
